﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Collector.Device
{
    public class CollectorIntention
    {
        private IntentionType type;
        private PulseProtocolPackage.PressureType pressureType;
        private bool result; // 返回结果true or false
        private object data;
        private string message;
        private string resultType;
        private double[] averageData = new double[3];

        public enum IntentionType
        {
            eINTENT_TYPE_UPDATE_SERIALPORT_LABLE,
            eINTENT_TYPE_REFRESH_TEST_TIME,
            eINTENT_TYPE_UPDATE_SENSOR_DATA,
            eINTENT_TYPE_UPDATE_GRAPH_CURVE,
            eINTENT_TYPE_UPDATE_BASELINE,
            eINTENT_TYPE_UPDATE_DEVICE_VERSION,
            eINTENT_TYPE_UPDATA_PULSE_RESULT,
            eINTENT_TYPE_UPDATA_FIXTURE_RESULT,
            eINTENT_TYPE_UPDATA_FIXTURE_PRESSURE
        }

        public CollectorIntention() { }

        public CollectorIntention(string msg, IntentionType t)
        {
            message = msg;
            type = t;
        }

        public bool Result { get; set; }

        public IntentionType Type
        {
            set { type = value; }
            get { return type; }
        }

        public string Message
        {
            set { message = value; }
            get { return message; }
        }
        public string ResultType
        {
            set { resultType = value; }
            get { return resultType; }
        }

        public PulseProtocolPackage.PressureType PressureType
        {
            set { pressureType = value; }
            get { return pressureType; }
        }

        public object Data
        {
            set { data = value; }
            get { return data; }
        }

        public double[] AverageData
        {
            get { return averageData; }
        }
    }
}
